/**
 *Copyright (c) 2024 watereyes
 * workflow is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.workflow.applicationManag.service;

import com.koron.workflow.applicationManag.bean.AppBean;
import com.koron.workflow.applicationManag.bean.AppQueryBean;
import com.koron.workflow.common.bean.PageBean;
import com.koron.workflow.common.bean.StaffBean;
import org.koron.ebs.mybatis.SessionFactory;
import org.swan.bean.MessageBean;

/**
 * 应用管理
 */
public interface AppManagService {
    /**
     * 根据条件查询 应用管理 列表
     *
     * @param factory
     * @param code     应用编号
     * @param name     应用名称
     * @param status   状态 0:停用，1:启用
     * @param page
     * @param pageSize
     * @return
     */
    PageBean<AppQueryBean> queryForList(SessionFactory factory, String code, String name, Integer status, Integer page, Integer pageSize);

    /**
     * 根据ID查询应用管理
     * @param factory
     * @param id
     * @return
     */
    AppQueryBean queryForObject(SessionFactory factory, String id);

    /**
     * 保存应用管理
     * @param user
     * @param bean
     * @return
     */
    MessageBean save(SessionFactory factory, StaffBean user, AppBean bean);

    /**
     * 修改应用管理
     * @param user
     * @param bean
     * @return
     */
    MessageBean update(SessionFactory factory, StaffBean user, AppBean bean);

    /**
     * 删除应用管理
     * @param id
     * @return
     */
    MessageBean delete(SessionFactory factory, String id);
}
